package com.evil.kingdom.service.base;

import com.evil.kingdom.pojo.dto.person.base.PersonDto;
import com.evil.kingdom.pojo.dto.person.base.PersonTypeDto;
import com.evil.kingdom.pojo.entity.person.base.Person;
import com.evil.kingdom.pojo.entity.person.base.PersonType;
import com.evil.kingdom.pojo.enums.PersonTypeEnum;
import com.evil.common.mongo.service.SingleService;

import java.util.Collection;
import java.util.List;
import java.util.Optional;

/**
 * 人物类型
 *
 * @author liyang
 * @date 2024-06-04 18:33
 */
public interface PersonTypeService<T extends PersonType, D extends PersonTypeDto> extends SingleService<T> {

    PersonTypeEnum type();

    Optional<T> isExistByName(String name);

    T findByName(String name);

    Optional<D> isExistDtoByName(String name);

    D findDtoByName(String name);

    List<D> isExistDtoListByNames(Collection<String> names);

    List<D> findDtoListByNames(Collection<String> names);

    Optional<D> isExistDtoByPerson(Person person);

    D findDtoByPerson(Person person);

    Optional<D> isExistDtoByPersonDto(PersonDto personDto);

    D findDtoByPersonDto(PersonDto personDto);
}
